package methodOverloading;


public class AreaCalculator {
	
	//Area of a square
	
	double area(double lengthOfSide)
	{
		System.out.println("Length of a side : " + lengthOfSide);
		
		double areaOfSquare = (lengthOfSide * lengthOfSide);
		System.out.println("Area of Square : " + areaOfSquare );
		return areaOfSquare;
	}
	
	//calculating area of a rectangle
	
	
	double areaOfRectangle;
	
	double area(double length, double width)
	{
		System.out.println("Length, width : " + length + " " + width);
		
		double areaOfRectangle = (length * width);
		System.out.println("Area of Rectangle : " + areaOfRectangle);
		return areaOfRectangle;	
				
	}
	

}
